
package min_path_one_to_all;

import java.util.*;

public class Graph {
	
    private List<List<Cell>> graphlist=new LinkedList<List<Cell>>();
	public Graph(){
		initGraph();
	}
	public List<List<Cell>> getGraphList(){
		return this.graphlist;
	}
	public void initGraph(){
		
		List<Cell> l0=new LinkedList<Cell>();
		  l0.add(new Cell(1,3));
		  l0.add(new Cell(4,1));
        graphlist.add(0,l0);
		
        List<Cell> l1=new LinkedList<Cell>();
          l1.add(new Cell(0,3));
          l1.add(new Cell(2,1));
          l1.add(new Cell(5,5));
		  l1.add(new Cell(6,3));
		  l1.add(new Cell(9,4));
        graphlist.add(1,l1);
		
        List<Cell> l2=new LinkedList<Cell>();
          l2.add(new Cell(1,1));
		  l2.add(new Cell(3,1));
		  l2.add(new Cell(6,7));
        graphlist.add(2,l2);
		
        List<Cell> l3=new LinkedList<Cell>();
          l3.add(new Cell(2,1));
		  l3.add(new Cell(10,2));
        graphlist.add(3,l3);
      
		List<Cell> l4=new LinkedList<Cell>();
		 l4.add(new Cell(0,1));
		 l4.add(new Cell(5,2));
        graphlist.add(4,l4);
       
		List<Cell> l5=new LinkedList<Cell>();		 
		 l5.add(new Cell(1,5)); 
		 l5.add(new Cell(4,2));	 
		 l5.add(new Cell(7,2));
		 l5.add(new Cell(8,3));
        graphlist.add(5,l5);
        
		List<Cell> l6=new LinkedList<Cell>();
		  l6.add(new Cell(1,3));
		  l6.add(new Cell(2,7)); 
		  l6.add(new Cell(8,2));
		  l6.add(new Cell(10,1));
        graphlist.add(6,l6);
      
		List<Cell> l7=new LinkedList<Cell>();
		 l7.add(new Cell(5,2));
        graphlist.add(7,l7);
      
		List<Cell> l8=new LinkedList<Cell>();
		  l8.add(new Cell(5,3));
		  l8.add(new Cell(6,2));
        graphlist.add(8,l8);
      
		List<Cell> l9=new LinkedList<Cell>();
		  l9.add(new Cell(1,4));
		  l9.add(new Cell(10,2));
        graphlist.add(9,l9);
      
		List<Cell> l10=new LinkedList<Cell>();
		  l10.add(new Cell(3,2));
		  l10.add(new Cell(6,1));
		  l10.add(new Cell(9,2));
        graphlist.add(10,l10);
        
	}
	
}

